package com.legal_documents_backend.service;
// 数据处理部分
import com.legal_documents_backend.mapper.CaseMapper;
import com.legal_documents_backend.pojo.Case;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class CaseService {
    @Autowired
    CaseMapper caseMapper;

    public List<Case> getCases(Integer pageNum,Integer pageSize){
        Integer offset=null;
        if(pageNum!=null && pageSize!=null){
            offset=(pageNum-1)*pageSize;
        }

        return caseMapper.selectCases(offset,pageSize);
    }

}
